package com.ruoyi.event.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.ExcelDictFormat;
import com.ruoyi.common.annotation.UserDrugInfo;
import com.ruoyi.common.annotation.UserMemberInfo;
import com.ruoyi.common.convert.ExcelDictConvert;
import lombok.Data;

import java.util.Date;


/**
 * 谈话记录视图对象 event_th
 *
 * @author strongme
 * @date 2023-02-04
 */
@Data
@ExcelIgnoreUnannotated
public class EventThVo implements EventInfo {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ExcelProperty(value = "id")
    private Long thId;

    /**
     * 吸毒人员id
     */
    @ExcelProperty(value = "吸毒人员id")
    private Long userId;

    @UserDrugInfo
    public Object getUserInfo() {
        return userId;
    }

    /**
     * 谈话人员id
     */
    @ExcelProperty(value = "谈话人员id")
    private Long memberId;

    @UserMemberInfo
    public Object getMemberInfo() {
        return memberId;
    }

    /**
     * 谈话类型
     */
    @ExcelProperty(value = "谈话类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "thlx")
    private String thlx;

    /**
     * 谈话日期
     */
    @ExcelProperty(value = "谈话日期")
    private Date thrq;

    /**
     * 谈话地址
     */
    @ExcelProperty(value = "谈话地址")
    private String thdz;

    /**
     * 谈话概要
     */
    @ExcelProperty(value = "谈话概要")
    private String thgy;

    /**
     * 谈话内容
     */
    @ExcelProperty(value = "谈话内容")
    private String thnr;

    /**
     * 现场照片或谈话内容（记录截图）
     */
    @ExcelProperty(value = "现场照片或谈话内容", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "记=录截图")
    private String img;

    /**
     * 附件
     */
    @ExcelProperty(value = "附件")
    private String fj;

    /**
     * 参与人
     */
    @ExcelProperty(value = "参与人")
    private String cyr;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;


    @Override
    public Long getId() {
        return thId;
    }

    @Override
    public String getText() {
        return thdz;
    }

    @Override
    @JsonFormat(pattern = "yyyy-MM-dd")
    public Date getTime() {
        return thrq;
    }
}
